/*
 * @Descripttion:
 * @version:
 * @Author: ada.wu
 * @Date: 2023-06-16 16:49:02
 * @LastEditors: ada.wu
 * @LastEditTime: 2023-10-28 12:12:00
 */
import { createApp, ref } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

import ElementPlus from 'element-plus';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css';
import 'element-plus/theme-chalk/dark/css-vars.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import '@/assets/css/index.css';
// import './mock/index'

import './assets/font/font.css'
const app = createApp(App)

// 设置全局变量
const isStateAside = ref(false);
const isDarkTheme = ref(false);
app.provide('global', {
    isDarkTheme,
    isStateAside,
})

app.use(createPinia())
app.use(router)
app.use(ElementPlus, { locale: zhCn, })
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.mount('#app')
